package com.kkb.robotcustomerservice.service.impl;

import com.kkb.robotcustomerservice.dao.GeneralAnswerDao;
import com.kkb.robotcustomerservice.entities.GeneralAnswer;
import com.kkb.robotcustomerservice.service.GeneralAnswerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: lqk
 * @Description:
 * @Date Created in 2020-11-25 16:39
 * @Modified By:
 */
@Service
public class GeneralAnswerServiceImpl implements GeneralAnswerService {

    @Autowired
    GeneralAnswerDao generalAnswerDao;


    @Override
    public int addAnswer(GeneralAnswer generalAnswer) {
        return generalAnswerDao.insert(generalAnswer);
    }

    @Override
    public int deleteAnswerById(int ansId) {
        return generalAnswerDao.deleteById(ansId);
    }

    @Override
    public GeneralAnswer getByQid(Integer qid) {
        return generalAnswerDao.getByQid(qid);
    }
}
